package com.ysw.springbootproject.dao;

import com.ysw.springbootproject.entity.Picture;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author 月上微
 * @date 2025/1/3
 * @since 15:03
 */
@Mapper
public interface PictureDao {

    /**
     * 返回图片列表
     *
     * @param map Map<String, Object>
     * @return List<Picture>
     */
    List<Picture> findPictures(Map<String, Object> map);

    /**
     * 数据数目
     *
     * @param map Map<String, Object>
     * @return int
     */
    int getTotalPictures(Map<String, Object> map);

    /**
     * 插入图片
     *
     * @param picture Picture
     * @return int
     */
    int insertPicture(Picture picture);

    /**
     * 修改图片
     *
     * @param picture Picture
     * @return int
     */
    int updatePicture(Picture picture);

    /**
     * 删除图片
     *
     * @param id Integer
     * @return int
     */
    int deletePicture(Integer id);

    /**
     * 根据id查询图片
     *
     * @param id Integer
     * @return Picture
     */
    Picture findPictureById(Integer id);

    /**
     * 批量删除
     *
     * @param id Object[]
     * @return int
     */
    int deleteBatch(Object[] id);
}
